<!DOCTYPE html>
<html>
<head>
<script src='https://code.jquery.com/jquery-3.3.1.min.js' type='text/javascript'></script>
<script src='basic.js' type='text/javascript'></script>
<script src='demo.js' type='text/javascript'></script>
<script src='random.js' type='text/javascript'></script>
<script src='quotes.js' type='text/javascript'></script>
<script src='quotes.json' type='text/javascript'></script>
<link href='index.css' rel='stylesheet' type='text/css'>
<link href='matrix.css' rel='stylesheet' type='text/css'>
<link href='https://assets-cdn.github.com/favicon.ico' rel='shortcut icon' type='image/x-icon'>
<meta charset='utf-8'>
</head>
<body>
<canvas id='c'></canvas>
<script>
  var show;
  function surprise() {
    if (document.getElementById("surprise").innerHTML === "😻Surprise"){
      var c=document.getElementById('c'), s=window.screen, w=c.width, h=c.height;
      show = showMatrix(c, s.width, s.height);
      document.getElementById('surprise').innerHTML='😲Stop';}
    else {
      clearInterval(show);
      document.getElementById('surprise').innerHTML='😻Surprise';
      c=document.getElementById("c");
      c.getContext("2d").clearRect(0,0,c.width,c.height);
    }
  }
  
  function getQuote() {
    showQuote(choice(quotes));
  }
  
  function showQuote(quote) {
    if (typeof quote === 'string') {
      document.getElementById("content").innerHTML = quote;
      document.getElementById("author").innerHTML = 'unknown';
    }
    else{
      document.getElementById("content").innerHTML = quote['content'];
      document.getElementById("author").innerHTML = quote['author'];
    }
  }
  
  const value = ["富强", "民主", "文明", "和谐",
  "自由", "平等", "公正", "法治",
  "爱国", "敬业", "诚信", "友善"];
  
  const colors = ["red", "blue", "yellow", "cyan",
  "purple", "pink", "black", "green",
  "orange", "magenta", "brown"];
  
  var index = 0;
  
  jQuery("body").click(function(e) {
      var $i = jQuery("<span/>").text(value[index]);
      index = index + 1;
      if (index >= 12) {index = index - 12;}
  
      $i.css({
          "z-index": 144469,
          "top": e.pageY - 20,
          "left": e.pageX,
          "position": "absolute",
          "font-weight": "bold",
          "color": choice(colors)
      });
      jQuery("body").append($i);
      $i.animate({
          "top": e.pageY - 180,
          "opacity": 0
      },
      1500,
      $i.remove);
  });
</script>
<div class='header'>
<div id='time'>
<script>
  document.write(getdate('⌚'))
</script>
</div>
</div>
<div class='show-quote'>
<div></div>
<button onclick='getQuote();'>🎲一句名言</button>
<button onclick='showQuote(randomFromFile(&#39;quotes.json&#39;));'>🎲一句名言 (不推荐)</button>
<button onclick='showQuote(&#39;blahblahblah...&#39;);'>🙂Click Me</button>
<div class='text'>
<div id='content'></div>
<div id='author'></div>
</div>
<textarea id='yours' onchange='document.getElementById(&#39;confirm&#39;).disabled=false;' placeholder='写下你的格言' rows='5'></textarea>
<button disabled='disabled' id='confirm' onclick='showQuote(document.getElementById(&#39;yours&#39;).value);'>确定</button>
</div>
<div class='container'>
<img class='img' src='https://hbimg.huabanimg.com/79d0e5196d7d96057300ef3e50e03b412e3550702a988-4lK3MJ_fw658'>
</div>
<div id='html-files'>
作品展示
<a href='photowall.html'>Photo Wall</a>
<button id='surprise' onclick='surprise();'>😻Surprise</button>
</div>
<br>
<p>
<h1 id="section">问候</h1>

<p>你好, <em>世界</em></p>

<h2 id="section-1">计划</h2>

<ul>
  <li>[ ] 
每周抽点时间，建设网站；
学习新技术，展示一下自己</li>
  <li>[x] 
买东西过冬</li>
  <li>[ ] 
看一部好看的电影</li>
  <li>[ ] 
倾听自我</li>
  <li>[ ]
其他 blahblahblah…</li>
</ul>

<h2 id="section-2">座右铭</h2>
<ul>
  <li>一件事情一旦要重复做两次以上，那就有价值去考虑如何自动化完成了。🙃</li>
  <li>我的长项是提问，弱项是不知道如何提问。</li>
</ul>

<h2 id="section-3">其他</h2>

<p>没有其他了</p>
</p>
友情链接
<a href='http://www.brainyquote.com' id='mylink' onclick='pass();'>Brainyquote</a>
</body>
</html>
